<?php
$sock = fsockopen("qq.com", 80, $errno, $errstr,1);
if (!$sock)
{
echo "$errstr ($errno)<br />\n";
}else{
//socket_set_blocking($sock,false);
//fwrite($sock, "send data...\r\n");
//fwrite($sock, "end\r\n");
//fwrite($sock, "can?\r\n");
while (!feof($sock)) {
echo fread($sock, 128);
flush();
ob_flush();
sleep(1);
}
fclose($sock);
}